const Home=()=>import("../views/home/Index.vue")
const MyCourse=()=>import("../views/home/MyCourse.vue")
const MainPage=()=>import("../views/home/MainPage.vue")
const NoticeTest=()=>import("../views/test/NoticeTest.vue")
const homes = [
    // 主页路由 - 登录成功后的默认页面
    {
        path: '/sh/main',
        component: MainPage,
        name: 'MainPage',
        meta: {
            title: '主页',
            requiresAuth: true
        }
    },
    // 直接路由到课程中心，与交流中心相同的方式
    {
        path: '/home/course/student',
        component: MyCourse,
        name:'MyCourse',
        meta:{
            title:'课程中心',
            requiresAuth: true
        }
    },
    {
        path: '/home',
        component: Home,
        name:'Home',
        meta: {
            requiresAuth: true // 需要登录认证
        },
        children: [
            {
                path: '',
                redirect: '/sh/main' // 将默认重定向改为主页
            },
            {
                path:"course/:role",
                component:MyCourse,
                name:'MyCourseWithRole',
                meta:{
                    title:'我的课程',
                    requiresAuth: true
                }
            },
        ]
    },
    {
        path: '/test/notice',
        component: NoticeTest,
        name: 'NoticeTest',
        meta: {
            title: '通知系统测试',
            requiresAuth: true
        }
    }
]
export default homes;